<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" >
<head>
  <meta charset="utf-8">
  <title>layuiAdmin 角色管理 iframe 框</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
</head>
<body>

  <div class="layui-form" lay-filter="layuiadmin-form-role" id="layuiadmin-form-role" style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
      <label class="layui-form-label">菜单名称</label>
      <div class="layui-input-block">
        <input type="text" name="title" lay-verify="required" placeholder="请输入菜单名称" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">图标</label>
      <div class="layui-input-block">
        <input type="text" id="iconPicker" name="icon" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">URL地址</label>
      <div class="layui-input-block">
        <input type="text" name="url" placeholder="请输入URL地址/一级菜单可不填写" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">父级菜单</label>
      <div class="layui-input-block">
        <select name="parentId">
          <option value="">请选择父级菜单/不选择为一级菜单</option>
          <option th:each="menu : ${menuList}" th:value="${menu.id}" th:text="${menu.title}" value="0">写作</option>
        </select>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">菜单状态</label>
      <div class="layui-input-block">
        <input type="radio" name="disabled" value="false" title="启用" checked="">
        <input type="radio" name="disabled" value="true" title="禁用">
      </div>
    </div>
    <div class="layui-form-item layui-hide">
      <button class="layui-btn" lay-submit lay-filter="LAY-menu-submit" id="LAY-menu-submit">提交</button>
    </div>
  </div>

  <script src="/layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'form','iconPicker'], function(){
    var $ = layui.$
    ,iconPicker= layui.iconPicker
    ,admin = layui.admin
    ,form = layui.form ;

    iconPicker.render({
      // 选择器，推荐使用input
      elem: '#iconPicker',
      // 数据类型：fontClass/unicode，推荐使用fontClass
      type: 'fontClass',
      // 是否开启搜索：true/false
      search: false,
    });

  })
  </script>
</body>
</html>